package org.example.shop.pojo;

import lombok.Data;
import lombok.ToString;

import javax.persistence.*;
import java.time.Instant;

@Entity
@ToString
@Data
@Table(name = "goods_data")
public class GoodsData {
    @Id
    private Integer id;
    private String title;
    private Double originPrice;
    private Double sellPrice;

    @Column(name = "category", nullable = false, length = 200)
    private String category;

    @Column(name = "sell_count")
    private Integer sellCount;

    @Column(name = "stock")
    private Integer stock;

    @Lob
    @Column(name = "`desc`")
    private String desc;

    @Column(name = "picture")
    private String picture;

    @Lob
    @Column(name = "content")
    private String content;

    @Column(name = "sort", nullable = false)
    private Integer sort;

    @Column(name = "origin_key", nullable = false, length = 500)
    private String originKey;

    @Column(name = "create_time")
    private Instant createTime;

    @Column(name = "update_time")
    private Instant updateTime;

    @Column(name = "status")
    private Integer status;
}
